package com.san.hkhospital.controller;
import com.san.hkhospital.entity.Surgery;
import com.san.hkhospital.service.SurDoService;
import com.san.hkhospital.service.SurgeryService;
import com.san.hkhospital.service.impl.SurgeryServiceImpl;
import com.san.hkhospital.vo.ResultVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* (surgery)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/surgery")
public class SurgeryController {
/**
* 服务对象
*/
@Resource
private SurgeryServiceImpl surgeryServiceImpl;
@Resource
private SurgeryService surgeryService;

/**
* 通过主键查询单条数据
*
* @param
* @return 单条数据
*/
//@GetMapping("selectOne")
//public Surgery selectOne(Integer id) {
//return surgeryServiceImpl.selectByPrimaryKey(id);
//}
@GetMapping
    public ResultVO surgeryList(){
     List<Surgery> surgeryList = surgeryService.surgeryList();
     return ResultVO.success("手术查询成功！",surgeryList);
}
}
